#!/bin/bash

computer_num=$((RANDOM%3 + 1))
echo  " $computer_num "
read -r  -p  "please  input your  num ,  1 rock , 2 papaer , 3  scissors "  user_num 

continue_game=1 

while  [[  continue_game  -eq  1  ]]  ;  do  


if [[ $computer_num -eq  user_num    ]];  then  

        echo  "five even  打平 "

elif [[   $computer_num -eq  1    ]]  &&  [[  user_num -eq 2 ]]   ; then


        echo  " computer  use  rock  , you  use   paper ,     you  win  "      
elif [[ $computer_num -eq   2 ]]  &&  [[  user_num  -eq  3  ]]  ;  then 

        echo  " computer  use  paper  , you  use   scissor ,     you  win  "      
elif [[  $computer_num  -eq  3 ]] && [[  user_num  -eq   1  ]] ; then  

        echo " computer  user  scissor , you  use  rock  , you win " 
else   
        echo  "  computer  use  $computer_num ,    you lose  ,  computer win " 

fi  

continue_game=0

done  

